<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.List" %>
<%@ page import="com.pojo.basic.CUST" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/default.jsp"  %>

<%
	String datas = (String)request.getAttribute("datas");
	System.out.println(datas);
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>系統設定【基本資料】</title>
<link rel="stylesheet" href="/Sunlike/extjs/resources/css/ext-all.css" type="text/css"></link>
<link rel="stylesheet" href="/Sunlike/css/toolbar.css" type="text/css"></link>
<script type="text/javascript" src="/Sunlike/extjs/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="/Sunlike/extjs/ext-all-debug.js"></script>
<style type="text/css">
<!--
a{text-decoration:none;color:black;};
-->
</style>
<script type="text/javascript">
function grid()
{
	var store = new Ext.data.ArrayStore({
		fields:[
			{name:'DEP'},
			{name:'NAME'},
			{name:'UP'},
			{name:'ENG_NAME'},
			{name:'STOP_DD'},
			{name:'GROUP_ID'},
			{name:'USR'},
			{name:'SYS_DATE'},
			{name:'SPC_NO'}
		]
	});
	store.loadData(<%= datas %>);
	var gird = new Ext.grid.GridPanel({
		renderTo:'griddiv',
		autoHeight : true,
		frame : false,
		bodyStyle : "width:100%",
		autoWidth:true,
		columns:[
			{id:'DEP',header:'代號',dataindex:'DEP',sortable:true},
			{id:'NAME',header:'全稱',dataindex:'NAME',sortable:true},
			{id:'UP',header:'上層部門',dataindex:'UP',sortable:true},
			{id:'ENG_NAME',header:'英文名稱',dataindex:'ENG_NAME',sortable:true},
			{id:'STOP_DD',header:'停用日期',dataindex:'STOP_DD',sortable:true},
			{id:'GROUP_ID',header:'是集團分公司',dataindex:'GROUP_ID',sortable:true},
			{id:'USR',header:'錄入員',dataindex:'USR',sortable:true},
			{id:'SYS_DATE',header:'輸入日期',dataindex:'SYS_DATE',sortable:true},
			{id:'SPC_NO',header:'分廠代號',dataindex:'SPC_NO',sortable:true}
		],
		height:550,
		tbar:[
			{text:'新增&nbsp;&nbsp;&nbsp;&nbsp;',iconCls:'user'},'-',
			{text:'編輯&nbsp;&nbsp;&nbsp;&nbsp;',iconCls:'edit'},'-',
			{text:'速查&nbsp;&nbsp;&nbsp;&nbsp;',iconCls:'search'},'-',
			{text:'刪除&nbsp;&nbsp;&nbsp;&nbsp;',iconCls:'del'},'-',
			{text:'打印&nbsp;&nbsp;&nbsp;&nbsp;',iconCls:'print'},'-',
			{text:'匯出',iconCls:'export'}
		],
		store:store
	});
	
	
}
Ext.onReady(grid);
</script>
</head>
<body>
<div id='toolbarspan'></div>

<table width="100%" border="0" align="center">
<tr><td align="center"><SPAN> <b> <font  size="3">系統設定：基本資料：部門代號</font></b></SPAN> </td></tr>
</table>	

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tbody><tr> 
      <td></td>
	  
      <td><div align="right"><span><img src="/Sunlike/images/arrow_r_r_small.gif" width="9" height="9"><font  style="font-size:14px;">修改紀錄</font>&nbsp;&nbsp;</span></div></td>
    </tr></tbody>
</table>
  
<div id="griddiv" ></div>
</body>
</html>